
README file for �Building the Party on the Ground: The Role of Access to Public Office for Party Growth�Author: Mathias Poertner (M.Poertner@lse.ac.uk)

------------------This file explains the contents of the data and code files in this replication folder. 

The data collected by the author for this article is included in this folder.

Before running the code, you will need to update the working directory at the top of the R scripts to reflect the file path to where you saved the replication files.

All data analyses in this article were carried out using R (version 4.1.2) for Mac (Platform: aarch64-apple-darwin20 (64-bit)) run on macOS Monterey (12.6.1).
------------------Main directory:------------------main_analysis.R:
	R file containing code to replicate the main analyses presented in the main paper and the online appendix.
	Produces cleaned analysis dataset (valid_diputado_dummy.RDa) used for other analyses below; Figures 5, A1; and Tables 2, 3, 4, 5, 6, C1, D1, D2, E1, E2, F1, F2, G1.
MORENA_list.csv:
	Dataset with information on 2015 MORENA PR list candidates, compiled based on candidate registration forms and other information from the Instituto Naci�nal Electoral (INE).

elections_2018_municipio.Rda:
	R object containing electoral returns for the 2018 election (votes for Chamber of Deputies), compiled based on information from the Instituto Naci�nal Electoral (INE).

elections_2012_municipio.Rda:
	R object containing electoral returns for the 2012 election (votes for Chamber of Deputies), compiled based on information from the Instituto Naci�nal Electoral (INE).

mun_charact.csv:
	Dataset with additional municipality characteristics, drawing on 2015 intercensal survey and 2015 poverty data from the Consejo Nacional de Evaluaci�n de la Pol�tica de Desarrollo Social (CONEVAL):
	Consejo Nacional de Evaluaci�n de la Pol�tica de Desarrollo Social (CONEVAL). Medici�n de la Pobreza: Consulta Din�mica de Resultados de Pobreza a Nivel Municipio 2010 y 2015. Accessed May 1, 2020. https://www.coneval.org.mx/Medicion/Paginas/consulta_pobreza_municipal.aspx
	Instituto Nacional de Estad�stica y Geograf�a (INEGI). Tabulados de la Encuesta Intercensal 2015. Accessed May 11, 2020. https://www.inegi.org.mx/programas/intercensal/2015/default.html#Tabulados

padron.RDa:
	Dataset with roster of MORENA party members who joined by 12/31/2018, compiled based on information from MORENA and the Instituto Naci�nal Electoral (INE).
	
valid_diputado_dummy.RDa:
	R object containing cleaned analysis dataset created by running main_analysis.R (used for other analyses in subdirectories).

Codebook.pdf:
	Codebook defining all variables used in the analyses.
	
main_analysis.pdf:
	Report with R code and output for the analyses in main_analysis.R.
------------------./Federal Transfers:------------------

analysis_federal_transfers.R: 
	R file containing code to replicate additional analyses using data on allocation of federal transfers.
	Produces Table G2.

analysis_federal_transfers.pdf:
	Report with R code and output for the analyses in analysis_federal_transfers.R.


-----
	This subdirectory also contains the following subdirectories and files containing annual state and municipal public finance data for 2015-2018 released by the Instituto Nacional de Estad�stica y Geograf�a (INEGI):
	INEGI: Estad�stica de Finanzas P�blicas Estatales y Municipales 1989-2019, informaci�n anual, Cifras preliminares 2019. MEX-INEGI.40.302.03-EFIPEM-2019
	The files were prepared and provided by INEGI.

./efipem_alcaldias_csv:

--
./catalogos:

tc_alcaldia.csv:
	Key to identify the boroughs of Mexico City.
	
tc_entidad.csv:
	Key to identify the federal entities/states.


--
./conjunto_de_datos:

efipem_alcaldia_anual_tr_cifra_2015.csv:
	Dataset with the raw state and municipal public finance data for the Mexico City boroughs for 2015.
 
efipem_alcaldia_anual_tr_cifra_2016.csv:
	Dataset with the raw state and municipal public finance data for the Mexico City boroughs for 2016.

efipem_alcaldia_anual_tr_cifra_2017.csv:
	Dataset with the raw state and municipal public finance data for the Mexico City boroughs for 2017.

efipem_alcaldia_anual_tr_cifra_2018.csv:
	Dataset with the raw state and municipal public finance data for the Mexico City boroughs for 2018.


--
./diccionario_de_datos:

diccionario_datos_efipem_alcaldia_anual_1999_2019.csv:
	Codebook for the columns in the original database.

--
./metadatos:

metadatos_efipem_alcaldia_anual_1999_2019.txt:
	Text file with the metadata for the dataset.

--
./modelo_entidad_relacion:

modelo_er_efipem_alcaldia_anual_1999_2019.png:
	Figure illustrating the structure of the database.

-----
./efipem_municipal_csv

--
./catalogos:

tc_entidad.csv:
	Key to identify the other municipalities.

tc_municipio.csv:
	Key to identify the federal entities/states.


--
./conjunto_de_datos:

efipem_municipal_anual_tr_cifra_2015.csv:
	Dataset with the raw state and municipal public finance data for the other municipalities for 2015.

efipem_municipal_anual_tr_cifra_2016.csv:
	Dataset with the raw state and municipal public finance data for the other municipalities for 2016.

efipem_municipal_anual_tr_cifra_2017.csv:
	Dataset with the raw state and municipal public finance data for the other municipalities for 2017.

efipem_municipal_anual_tr_cifra_2018.csv:
	Dataset with the raw state and municipal public finance data for the other municipalities for 2018.


--
./diccionario_de_datos:

diccionario_datos_efipem_municipal_anual_1989_2019.csv:
	Codebook for the columns in the original database.

--
./metadatos:

metadatos_efipem_municipal_anual_1989_2019.txt:
	Text file with the metadata for the dataset.

--
./modelo_entidad_relacion:

modelo_er_efipem_municipal_anual_1989_2019.png:
	Figure illustrating the structure of the database.

------------------./Congressional Biographies:------------------Org_background_MORENA_lottery_deputies.R:
	R file containing code to prepare plot about lottery deputies' organizational involvement.
	Produces Figure 4.

2015_PR_MORENA_orgs.csv: 
	Dataset with data on organizational involvement of MORENA PR deputies; compiled coded based deputies' congressional biographies (hence only available for elected deputies).

Org_background_MORENA_lottery_deputies.pdf:
	Report with R code and output for the analyses in Org_background_MORENA_lottery_deputies.R.


------------------./Map:------------------map.R:
	R file containing code to create map (Figure 3).

control_municipalities.csv:
	Dataset containing the names of the municipalities in control group.

treament_municipalities.csv:
	Dataset containing the names of the municipalities in treatment group.

-----
./newshp:

mex_admbnda_adm2_govmex.cpg
mex_admbnda_adm2_govmex.dbf
mex_admbnda_adm2_govmex.prj
mex_admbnda_adm2_govmex.sbn
mex_admbnda_adm2_govmex.sbx
mex_admbnda_adm2_govmex.shp
mex_admbnda_adm2_govmex.shp.xml
mex_admbnda_adm2_govmex.shx

	Shape files with subnational administrative boundaries for Mexico.
	Downloaded from HDX: Mexico - Subnational Administrative Boundaries. OCHA Regional Office for Latin America and the Caribbean (ROLAC). Accessed on April 3, 2020. https://data.humdata.org/dataset/cod-ab-mex.
